/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * <p>
 * This is an automatic generated file. It will be regenerated every time
 * you generate persistence class.
 * <p>
 * Modifying its content may cause the program not work, or your work may lost.
 * <p>
 * Licensee:
 * License Type: Evaluation
 * <p>
 * Licensee:
 * License Type: Evaluation
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
package com.lw.extraceim.model;

import com.google.gson.annotations.Expose;

import java.io.Serializable;

public class TransPackage implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 3050390478904210174L;

    public TransPackage() {
    }

    @Expose
    private String id;
    @Expose
    private String sourceNode;
    @Expose
    private String targetNode;
    @Expose
    private java.sql.Timestamp createTime;
    @Expose
    private int status;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getORMID() {
        return getId();
    }

    public void setSourceNode(String value) {
        this.sourceNode = value;
    }

    public String getSourceNode() {
        return sourceNode;
    }

    public void setTargetNode(String value) {
        this.targetNode = value;
    }

    public String getTargetNode() {
        return targetNode;
    }

    public void setCreateTime(java.sql.Timestamp value) {
        this.createTime = value;
    }

    public java.sql.Timestamp getCreateTime() {
        return createTime;
    }

    public void setStatus(int value) {
        this.status = value;
    }

    public int getStatus() {
        return status;
    }
    //新建
    public static final int PACKAGE_NEW = 0;
    //打包
    public static final int PACKAGE_PACK = 1;
    //转运
    public static final int PACKAGE_TRANS = 2;
    //分拣货篮s
    public static final int PACKAGE_SORTING = 3;
    //揽收货篮
    public static final int PACKAGE_COLLECT = 4;
    //派送货篮
    public static final int PACKAGE_DELIVER = 5;
    //包裹已拆包，被废弃的状态
    public static final int PACKAGE_COMPLETE = 6;
    public String getStatusString() {
        switch (status) {
            case 0:
                return "新建";
            case 1:
                return "打包";
            case 2:
                return "转运中";
            case 3:
                return "正在分拣";
            case 4:
                return "揽收货篮";
            case 5:
                return "派送货篮";
            case 6:
                return "已拆包";
            default:
                return "";
        }
    }


    public String toString() {
        return toString(false);
    }

    public String toString(boolean idOnly) {
        if (idOnly) {
            return String.valueOf(getId());
        } else {
            StringBuffer sb = new StringBuffer();
            sb.append("TransPackage[ ");
            sb.append("ID=").append(getId()).append(" ");
            sb.append("SourceNode=").append(getSourceNode()).append(" ");
            sb.append("TargetNode=").append(getTargetNode()).append(" ");
            sb.append("CreateTime=").append(getCreateTime()).append(" ");
            sb.append("Status=").append(getStatus()).append(" ");
            sb.append("]");
            return sb.toString();
        }
    }

    private boolean _saved = false;

    public void onSave() {
        _saved = true;
    }


    public void onLoad() {
        _saved = true;
    }


    public boolean isSaved() {
        return _saved;
    }



}
